﻿using System.Collections.Generic;
using System.Linq;

namespace InstantMessenger.Transports
{
    public class TwitterSettings
    {
        public TwitterSettings()
        {
            TwitterContacts = new List<TwitterContact>();
        }

        public List<TwitterContact> TwitterContacts { get; set; }

        public bool IsTwitterContact(string name)
        {
            return TwitterContacts.Any(x => x.Name == name);
        }

        public TwitterContact GetTwitterContact(string name)
        {
            return TwitterContacts.FirstOrDefault(x => x.Name == name);
        }
    }
}